<?php
	

defined('_JEXEC') or die('Restricted access');

class TableNBEventMap extends JTable
{
	
	var $id					= 0;
	var $nom				= '';
	var $alias				= '';
	var $adresse	  		= '';
	var $adresse2	  		= '';
	var $ville				= '';
	var $departement		= '';
	var $codepostal			= '';
	var $pay		  		= '';
	var $tel		  		= '';
	var $tel2		  		= '';
	var $fax		  		= '';
	var $email		  		= '';
	var $web		  		= '';
	var $img		  		= '';
	var $album		  		= 0;
	var $intro				= '';
	var $message			= '';
	var $horaires_prix		= '';
	var $link				= '';
	var $icon				= '';
	var $icon_label			= '';
	var $article_id			= '';
	var $affichage			= '';
	var $marqueur			= 'http://labs.google.com/ridefinder/images/mm_20_green.png';
	var $glng				= '';
	var $glat				= '';
	var $gzoom				= '';
	var $catid				= '';
	var $userid				= '';
	var $published			= 1;
	var $checked_out		= 0;
	var $metadesc			= '';
	var $metakey			= '';
	var $ordering			= null;
	
	var $start_date				= '';
	var $end_date				= '';
	var $url_video				    = '';

	
	function TableNBEventMap(& $db) {
		parent::__construct('#__nbeventmap', 'id', $db);
	}

	function check()
	{
		
		$filter = new JFilterInput(array(), array(), 0, 0);
		$this->nom = $filter->clean($this->nom);

		if(empty($this->alias)) {
			$this->alias = $this->nom;
		}
		$this->alias = JFilterOutput::stringURLSafe($this->alias);
		if(trim(str_replace('-','',$this->alias)) == '') {
			$datenow =& JFactory::getDate();
			$this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
		}

		return true;
	}
}
?>
